package com.zjitc.dao;

import com.zjitc.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IDEA
 * author:lhl
 * Date:2019/2/19 0019
 * Time:11:02
 */
public interface UserDao {
    /**
     * 通过用户名和state查找用户
     * @param username
     * @param state
     * @return
     */
    User findOne(@Param("username") String username, @Param("state") int state);

    /**
     * 找所有的state下的用户
     * @param state
     * @return
     */
    List<User>findAllByState(int state);

    /**
     * 通过id获取用户
     * @param id
     * @return
     */
    User findById(int id);
}
